#include <iostream>

using namespace std;

//sizeof作用:利用sizeof关键字可以统计数据类型所占内存大小
//语法:sizeof(数据类型/变量)
//整型的大小比较
//short<int<=long<long long
int main() {
    cout << "short占用" << sizeof(short) << endl;//2
    cout << "int占用" << sizeof(int) << endl;//4
    cout << "long占用" << sizeof(long) << endl;//4
    cout << "long long占用" << sizeof(long long) << endl;//8

    int num = 10;
    cout << "num占用" << sizeof(num) << endl;//4
    return 0;
}

